home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.0 / PInterfaces / Video.p < prev    next >
Encoding:
Text File  |  1995-04-18  |  21.9 KB  |  569 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Video.p
  3.  
  4.      Contains:    Video Driver Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. }
  19.  
  20. {$IFC UNDEFINED UsingIncludes}
  21. {$SETC UsingIncludes := 0}
  22. {$ENDC}
  23.  
  24. {$IFC NOT UsingIncludes}
  25.  UNIT Video;
  26.  INTERFACE
  27. {$ENDC}
  28.  
  29. {$IFC UNDEFINED __VIDEO__}
  30. {$SETC __VIDEO__ := 1}
  31.  
  32. {$I+}
  33. {$SETC VideoIncludes := UsingIncludes}
  34. {$SETC UsingIncludes := 1}
  35.  
  36.  
  37. {$IFC UNDEFINED __QUICKDRAW__}
  38. {$I Quickdraw.p}
  39. {$ENDC}
  40. {    Types.p                                                        }
  41. {        ConditionalMacros.p                                        }
  42. {    MixedMode.p                                                    }
  43. {    QuickdrawText.p                                                }
  44.  
  45. {$PUSH}
  46. {$ALIGN MAC68K}
  47. {$LibExport+}
  48.  
  49. CONST
  50.     mBaseOffset                    = 1;                            {Id of mBaseOffset.}
  51.     mRowBytes                    = 2;                            {Video sResource parameter Id's }
  52.     mBounds                        = 3;                            {Video sResource parameter Id's }
  53.     mVersion                    = 4;                            {Video sResource parameter Id's }
  54.     mHRes                        = 5;                            {Video sResource parameter Id's }
  55.     mVRes                        = 6;                            {Video sResource parameter Id's }
  56.     mPixelType                    = 7;                            {Video sResource parameter Id's }
  57.     mPixelSize                    = 8;                            {Video sResource parameter Id's }
  58.     mCmpCount                    = 9;                            {Video sResource parameter Id's }
  59.     mCmpSize                    = 10;                            {Video sResource parameter Id's }
  60.     mPlaneBytes                    = 11;                            {Video sResource parameter Id's }
  61.     mVertRefRate                = 14;                            {Video sResource parameter Id's }
  62.     mVidParams                    = 1;                            {Video parameter block id.}
  63.     mTable                        = 2;                            {Offset to the table.}
  64.     mPageCnt                    = 3;                            {Number of pages}
  65.     mDevType                    = 4;                            {Device Type}
  66.     oneBitMode                    = 128;                            {Id of OneBitMode Parameter list.}
  67.     twoBitMode                    = 129;                            {Id of TwoBitMode Parameter list.}
  68.     fourBitMode                    = 130;                            {Id of FourBitMode Parameter list.}
  69.     eightBitMode                = 131;                            {Id of EightBitMode Parameter list.}
  70.  
  71.     sixteenBitMode                = 132;                            {Id of SixteenBitMode Parameter list.}
  72.     thirtyTwoBitMode            = 133;                            {Id of ThirtyTwoBitMode Parameter list.}
  73.     firstVidMode                = 128;                            {The new, better way to do the above. }
  74.     secondVidMode                = 129;                            { QuickDraw only supports six video }
  75.     thirdVidMode                = 130;                            { at this time.      }
  76.     fourthVidMode                = 131;
  77.     fifthVidMode                = 132;
  78.     sixthVidMode                = 133;
  79.     spGammaDir                    = 64;
  80.     spVidNamesDir                = 65;
  81.  
  82. { csTimingFormat values in VDTimingInfo }
  83. { look in the declaration rom for timing info }
  84.     kDeclROMtables                = 'decl';
  85.  
  86. { Timing mode constants for Display Manager MultiMode support
  87.     Corresponding    .h equates are in Video.h
  88.                     .a equates are in Video.a
  89.                     .r equates are in DepVideoEqu.r
  90. }
  91.     timingInvalid                = 0;                            { Unknown timing… force user to confirm.}
  92.     timingApple12                = 130;                            {  512x384 (60 Hz) Rubik timing.}
  93.     timingApple12x                = 135;                            {  560x384 (60 Hz) Rubik-560 timing.}
  94.     timingApple13                = 140;                            {  640x480 (67 Hz) HR timing.}
  95.     timingApple13x                = 145;                            {  640x400 (67 Hz) HR-400 timing.}
  96.     timingAppleVGA                = 150;                            {  640x480 (60 Hz) VGA timing.}
  97.     timingApple15                = 160;                            {  640x870 (75 Hz) FPD timing.}
  98.     timingApple15x                = 165;                            {  640x818 (75 Hz) FPD-818 timing.}
  99.     timingApple16                = 170;                            {  832x624 (75 Hz) GoldFish timing.}
  100.     timingAppleSVGA                = 180;                            {  800x600 (56 Hz) SVGA timing.}
  101.     timingApple1Ka                = 190;                            { 1024x768 (60 Hz) VESA 1K-60Hz timing.}
  102.     timingApple1Kb                = 200;                            { 1024x768 (70 Hz) VESA 1K-70Hz timing.}
  103.     timingApple19                = 210;                            { 1024x768 (75 Hz) Apple 19" RGB.}
  104.     timingApple21                = 220;                            { 1152x870 (75 Hz) Apple 21" RGB.}
  105.     timingAppleNTSC_ST            = 230;                            {  512x384 (60 Hz, interlaced, non-convolved).}
  106.     timingAppleNTSC_FF            = 232;                            {  640x480 (60 Hz, interlaced, non-convolved).}
  107.     timingAppleNTSC_STconv        = 234;                            {  512x384 (60 Hz, interlaced, convolved).}
  108.     timingAppleNTSC_FFconv        = 236;                            {  640x480 (60 Hz, interlaced, convolved).}
  109.     timingApplePAL_ST            = 238;                            {  640x480 (50 Hz, interlaced, non-convolved).}
  110.     timingApplePAL_FF            = 240;                            {  768x576 (50 Hz, interlaced, non-convolved).}
  111.     timingApplePAL_STconv        = 242;                            {  640x480 (50 Hz, interlaced, non-convolved).}
  112.     timingApplePAL_FFconv        = 244;                            {  768x576 (50 Hz, interlaced, non-convolved).}
  113.  
  114. { csConnectFlags values in VDDisplayConnectInfo }
  115.     kAllModesValid                = 0;                            { All modes not trimmed by primary init are good close enough to try }
  116.     kAllModesSafe                = 1;                            { All modes not trimmed by primary init are know to be safe }
  117.     kReportsTagging                = 2;                            { Can detect tagged displays (to identify smart monitors) }
  118.     kHasDirectConnection        = 3;                            { True implies that driver can talk directly to device (e.g. serial data link via sense lines) }
  119.     kIsMonoDev                    = 4;                            { Says whether there’s an RGB (0) or Monochrome (1) connection. }
  120.     kUncertainConnection        = 5;                            { There may not be a display (no sense lines?). }
  121.     kTaggingInfoNonStandard        = 6;                            { Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). }
  122.     kReportsDDCConnection        = 7;                            { Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). }
  123.     kHasDDCConnection            = 8;                            { Card has ddc connect now. }
  124.  
  125. { csDisplayType values in VDDisplayConnectInfo }
  126.     kUnknownConnect                = 1;                            { Not sure how we’ll use this, but seems like a good idea. }
  127.     kPanelConnect                = 2;                            { For use with fixed-in-place LCD panels. }
  128.     kPanelTFTConnect            = 2;                            { Alias for kPanelConnect }
  129.     kFixedModeCRTConnect        = 3;                            {  For use with fixed-mode (i.e., very limited range) displays. }
  130.     kMultiModeCRT1Connect        = 4;                            { 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe }
  131.     kMultiModeCRT2Connect        = 5;                            { 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe }
  132.     kMultiModeCRT3Connect        = 6;                            { 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain }
  133.     kMultiModeCRT4Connect        = 7;                            { Expansion to large multi mode (not yet used) }
  134.     kModelessConnect            = 8;                            { Expansion to modeless model (not yet used) }
  135.     kFullPageConnect            = 9;                            { 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) }
  136.     kVGAConnect                    = 10;                            { 640x480 VGA default -- question everything else }
  137.     kNTSCConnect                = 11;                            { NTSC ST (default), FF, STconv, FFconv }
  138.     kPALConnect                    = 12;                            { PAL ST (default), FF, STconv, FFconv }
  139.     kHRConnect                    = 13;                            { 640x400 (to get 8bpp in 256K case) and 640x480 (these two only) }
  140.     kPanelFSTNConnect            = 14;                            { For use with fixed-in-place LCD FSTN (aka “Supertwist”) panels }
  141.  
  142. { csTimingFlags values in VDTimingInfoRec }
  143.     kModeValid                    = 0;                            { Says that this mode should NOT be trimmed. }
  144.     kModeSafe                    = 1;                            { This mode does not need confirmation }
  145.     kModeDefault                = 2;                            { This is the default mode for this type of connection }
  146.     kModeShowNow                = 3;                            { This mode should always be shown (even though it may require a confirm) }
  147.     kModeNotResize                = 4;                            { This mode should not be used to resize the display (eg. mode selects a different connector on card) }
  148.     kModeRequiresPan            = 5;                            { This mode has more pixels than are actually displayed }
  149.  
  150. { Control Codes }
  151.     cscReset                    = 0;
  152.     cscKillIO                    = 1;
  153.     cscSetMode                    = 2;
  154.     cscSetEntries                = 3;
  155.     cscSetGamma                    = 4;
  156.     cscGrayPage                    = 5;
  157.     cscGrayScreen                = 5;
  158.     cscSetGray                    = 6;
  159.     cscSetInterrupt                = 7;
  160.     cscDirectSetEntries            = 8;
  161.     cscSetDefaultMode            = 9;
  162.     cscSwitchMode                = 10;
  163.     cscSetSync                    = 11;
  164.     cscSavePreferredConfiguration = 16;
  165.     cscSetHardwareCursor        = 22;
  166.     cscDrawHardwareCursor        = 23;
  167.     cscSetConvolution            = 24;
  168.     cscUnusedCall                = 127;                            { This call used to expend the scrn resource.  Its imbedded data contains more control info }
  169.  
  170. { Status Codes }
  171.     cscGetMode                    = 2;
  172.     cscGetEntries                = 3;
  173.     cscGetPageCnt                = 4;
  174.     cscGetPages                    = 4;                            { This is what C&D 2 calls it. }
  175.     cscGetPageBase                = 5;
  176.     cscGetBaseAddr                = 5;                            { This is what C&D 2 calls it. }
  177.     cscGetGray                    = 6;
  178.     cscGetInterrupt                = 7;
  179.     cscGetGamma                    = 8;
  180.     cscGetDefaultMode            = 9;
  181.     cscGetCurMode                = 10;
  182.     cscGetSync                    = 11;
  183.     cscGetConnection            = 12;                            { Return information about the connection to the display }
  184.     cscGetModeTiming            = 13;                            { Return timing info for a mode }
  185.     cscGetModeBaseAddress        = 14;                            { Return base address information about a particular mode }
  186.     cscGetScanProc                = 15;                            { QuickTime scan chasing routine }
  187.     cscGetPreferredConfiguration = 16;
  188.     cscGetNextResolution        = 17;
  189.     cscGetVideoParameters        = 18;
  190.     cscGetGammaList                = 19;                            { Obsolete }
  191.     cscGetGammaInfoList            = 20;
  192.     cscRetrieveGammaTable        = 21;
  193.     cscSupportsHardwareCursor    = 22;
  194.     cscGetConvolution            = 24;
  195.  
  196. { Bit definitions for the Get/Set Sync call}
  197.     kDisableHorizontalSyncBit    = 0;
  198.     kDisableVerticalSyncBit        = 1;
  199.     kDisableCompositeSyncBit    = 2;
  200.     kEnableSyncOnBlue            = 3;
  201.     kEnableSyncOnGreen            = 4;
  202.     kEnableSyncOnRed            = 5;
  203.     kNoSeparateSyncControlBit    = 6;
  204.     kHorizontalSyncMask            = $01;
  205.     kVerticalSyncMask            = $02;
  206.     kCompositeSyncMask            = $04;
  207.     kDPMSSyncMask                = $7;
  208.     kSyncOnBlueMask                = $08;
  209.     kSyncOnGreenMask            = $10;
  210.     kSyncOnRedMask                = $20;
  211.     kSyncOnMask                    = $38;
  212.  
  213. {    Power Mode constants for translating DPMS modes to Get/SetSync calls.    }
  214.     kDPMSSyncOn                    = 0;
  215.     kDPMSSyncStandby            = 1;
  216.     kDPMSSyncSuspend            = 2;
  217.     kDPMSSyncOff                = 7;
  218.  
  219. { Bit definitions for the Get/Set Convolution call}
  220.     kConvolved                    = 0;
  221.     kLiveVideoPassThru            = 1;
  222.     kConvolvedMask                = $01;
  223.     kLiveVideoPassThruMask        = $02;
  224.  
  225.  
  226. TYPE
  227.     VPBlock = RECORD
  228.         vpBaseOffset:            LONGINT;                                {Offset to page zero of video RAM (From minorBaseOS).}
  229.         vpRowBytes:                INTEGER;                                {Width of each row of video memory.}
  230.         vpBounds:                Rect;                                    {BoundsRect for the video display (gives dimensions).}
  231.         vpVersion:                INTEGER;                                {PixelMap version number.}
  232.         vpPackType:                INTEGER;
  233.         vpPackSize:                LONGINT;
  234.         vpHRes:                    LONGINT;                                {Horizontal resolution of the device (pixels per inch).}
  235.         vpVRes:                    LONGINT;                                {Vertical resolution of the device (pixels per inch).}
  236.         vpPixelType:            INTEGER;                                {Defines the pixel type.}
  237.         vpPixelSize:            INTEGER;                                {Number of bits in pixel.}
  238.         vpCmpCount:                INTEGER;                                {Number of components in pixel.}
  239.         vpCmpSize:                INTEGER;                                {Number of bits per component}
  240.         vpPlaneBytes:            LONGINT;                                {Offset from one plane to the next.}
  241.     END;
  242.  
  243.     VPBlockPtr = ^VPBlock;
  244.  
  245.     VDEntryRecord = RECORD
  246.         csTable:                Ptr;                                    {(long) pointer to color table entry=value, r,g,b:INTEGER}
  247.     END;
  248.  
  249.     VDEntRecPtr = ^VDEntryRecord;
  250.  
  251. { Parm block for SetGray control call }
  252.     VDGrayRecord = RECORD
  253.         csMode:                    BOOLEAN;                                {Same as GDDevType value (0=mono, 1=color)}
  254.     END;
  255.  
  256.     VDGrayPtr = ^VDGrayRecord;
  257.  
  258. { Parm block for SetEntries control call }
  259.     VDSetEntryRecord = RECORD
  260.         csTable:                ^ColorSpec;                                {Pointer to an array of color specs}
  261.         csStart:                INTEGER;                                {Which spec in array to start with, or -1}
  262.         csCount:                INTEGER;                                {Number of color spec entries to set}
  263.     END;
  264.  
  265.     VDSetEntryPtr = ^VDSetEntryRecord;
  266.  
  267. { Parm block for SetGamma control call }
  268.     VDGammaRecord = RECORD
  269.         csGTable:                Ptr;                                    {pointer to gamma table}
  270.     END;
  271.  
  272.     VDGamRecPtr = ^VDGammaRecord;
  273.  
  274.     VDBaseAddressInfoRec = RECORD
  275.         csDevData:                LONGINT;                                { LONGINT - (long) timing mode }
  276.         csDevBase:                LONGINT;                                { LONGINT - (long) base address of the mode }
  277.         csModeReserved:            INTEGER;                                { INTEGER - (short) will some day be the depth }
  278.         csModeBase:                LONGINT;                                { LONGINT - (long) reserved }
  279.     END;
  280.  
  281.     VDBaseAddressInfoPtr = ^VDBaseAddressInfoRec;
  282.  
  283.     VDSwitchInfoRec = RECORD
  284.         csMode:                    INTEGER;                                {(word) mode depth}
  285.         csData:                    LONGINT;                                {(long) functional sResource of mode}
  286.         csPage:                    INTEGER;                                {(word) page to switch in}
  287.         csBaseAddr:                Ptr;                                    {(long) base address of page (return value)}
  288.         csReserved:                LONGINT;                                {(long) Reserved (set to 0) }
  289.     END;
  290.  
  291.     VDSwitchInfoPtr = ^VDSwitchInfoRec;
  292.  
  293.     VDTimingInfoRec = RECORD
  294.         csTimingMode:            LONGINT;                                { LONGINT - (long) timing mode (a la InitGDevice) }
  295.         csTimingReserved:        LONGINT;                                { LONGINT - (long) reserved }
  296.         csTimingFormat:            LONGINT;                                { LONGINT - (long) what format is the timing info }
  297.         csTimingData:            LONGINT;                                { LONGINT - (long) data supplied by driver }
  298.         csTimingFlags:            LONGINT;                                { LONGINT - (long) mode within device }
  299.     END;
  300.  
  301.     VDTimingInfoPtr = ^VDTimingInfoRec;
  302.  
  303.     VDDisplayConnectInfoRec = RECORD
  304.         csDisplayType:            INTEGER;                                { INTEGER - (word) Type of display connected }
  305.         csConnectTaggedType:    SInt8; (* unsigned char *)                { BYTE - type of tagging }
  306.         csConnectTaggedData:    SInt8; (* unsigned char *)                { BYTE - tagging data }
  307.         csConnectFlags:            LONGINT;                                { LONGINT - (long) tell us about the connection }
  308.         csDisplayComponent:        LONGINT;                                { LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE) }
  309.         csConnectReserved:        LONGINT;                                { LONGINT - (long) reserved }
  310.     END;
  311.  
  312.     VDDisplayConnectInfoPtr = ^VDDisplayConnectInfoRec;
  313.  
  314. { RawSenseCode
  315.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  316.     for the possible raw sense code values when 'standard' sense code hardware is implemented.
  317.  
  318.     For 'standard' sense code hardware, the raw sense is obtained as follows:
  319.         • Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
  320.         • Read the state of the monitor sense lines 2, 1, and 0.  (2 is the MSB, 0 the LSB)
  321.  
  322.     IMPORTANT Note: 
  323.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  324.     are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo' 
  325.  
  326. }
  327.     RawSenseCode = CHAR;
  328.  
  329.  
  330. CONST
  331.     kRSCZero                    = 0;
  332.     kRSCOne                        = 1;
  333.     kRSCTwo                        = 2;
  334.     kRSCThree                    = 3;
  335.     kRSCFour                    = 4;
  336.     kRSCFive                    = 5;
  337.     kRSCSix                        = 6;
  338.     kRSCSeven                    = 7;
  339.  
  340. { ExtendedSenseCode
  341.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  342.     for the values which are possible when the extended sense algorithm is applied to hardware
  343.     which implements 'standard' sense code hardware.
  344.  
  345.      For 'standard' sense code hardware, the extended sense code algorithm is as follows:
  346.     (Note:  as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0')
  347.         • Drive sense line 'A' low and read the values of 'B' and 'C'.  
  348.         • Drive sense line 'B' low and read the values of 'A' and 'C'.
  349.         • Drive sense line 'C' low and read the values of 'A' and 'B'.
  350.  
  351.     In this way, a six-bit number of the form BC/AC/AB is generated. 
  352.  
  353.     IMPORTANT Note: 
  354.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  355.     are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo' 
  356.  
  357. }
  358.     
  359. TYPE
  360.     ExtendedSenseCode = CHAR;
  361.  
  362.  
  363. CONST
  364.     kESCZero21Inch                = $00;                            { 21" RGB                                 }
  365.     kESCOnePortraitMono            = $14;                            { Portrait Monochrome                     }
  366.     kESCTwo12Inch                = $21;                            { 12" RGB                                }
  367.     kESCThree21InchRadius        = $31;                            { 21" RGB (Radius)                        }
  368.     kESCThree21InchMonoRadius    = $34;                            { 21" Monochrome (Radius)                 }
  369.     kESCThree21InchMono            = $35;                            { 21" Monochrome                        }
  370.     kESCFourNTSC                = $0A;                            { NTSC                                 }
  371.     kESCFivePortrait            = $1E;                            { Portrait RGB                         }
  372.     kESCSixMSB1                    = $03;                            { MultiScan Band-1 (12" thru 1Six")    }
  373.     kESCSixMSB2                    = $0B;                            { MultiScan Band-2 (13" thru 19")        }
  374.     kESCSixMSB3                    = $23;                            { MultiScan Band-3 (13" thru 21")        }
  375.     kESCSixStandard                = $2B;                            { 13"/14" RGB or 12" Monochrome        }
  376.     kESCSevenPAL                = $00;                            { PAL                                    }
  377.     kESCSevenNTSC                = $14;                            { NTSC                                 }
  378.     kESCSevenVGA                = $17;                            { VGA                                     }
  379.     kESCSeven16Inch                = $2D;                            { 16" RGB (GoldFish)                      }
  380.     kESCSevenPALAlternate        = $30;                            { PAL (Alternate)                         }
  381.     kESCSeven19Inch                = $3A;                            { Third-Party 19”                        }
  382.     kESCSevenNoDisplay            = $3F;                            { No display connected                 }
  383.  
  384.  
  385. TYPE
  386.     VDPageInfo = RECORD
  387.         csMode:                    INTEGER;                                {(word) mode within device}
  388.         csData:                    LONGINT;                                {(long) data supplied by driver}
  389.         csPage:                    INTEGER;                                {(word) page to switch in}
  390.         csBaseAddr:                Ptr;                                    {(long) base address of page}
  391.     END;
  392.  
  393.     VDPgInfoPtr = ^VDPageInfo;
  394.  
  395.     VDSizeInfo = RECORD
  396.         csHSize:                INTEGER;                                {(word) desired/returned h size}
  397.         csHPos:                    INTEGER;                                {(word) desired/returned h position}
  398.         csVSize:                INTEGER;                                {(word) desired/returned v size}
  399.         csVPos:                    INTEGER;                                {(word) desired/returned v position}
  400.     END;
  401.  
  402.     VDSzInfoPtr = ^VDSizeInfo;
  403.  
  404.     VDSettings = RECORD
  405.         csParamCnt:                INTEGER;                                {(word) number of params}
  406.         csBrightMax:            INTEGER;                                {(word) max brightness}
  407.         csBrightDef:            INTEGER;                                {(word) default brightness}
  408.         csBrightVal:            INTEGER;                                {(word) current brightness}
  409.         csCntrstMax:            INTEGER;                                {(word) max contrast}
  410.         csCntrstDef:            INTEGER;                                {(word) default contrast}
  411.         csCntrstVal:            INTEGER;                                {(word) current contrast}
  412.         csTintMax:                INTEGER;                                {(word) max tint}
  413.         csTintDef:                INTEGER;                                {(word) default tint}
  414.         csTintVal:                INTEGER;                                {(word) current tint}
  415.         csHueMax:                INTEGER;                                {(word) max hue}
  416.         csHueDef:                INTEGER;                                {(word) default hue}
  417.         csHueVal:                INTEGER;                                {(word) current hue}
  418.         csHorizDef:                INTEGER;                                {(word) default horizontal}
  419.         csHorizVal:                INTEGER;                                {(word) current horizontal}
  420.         csHorizMax:                INTEGER;                                {(word) max horizontal}
  421.         csVertDef:                INTEGER;                                {(word) default vertical}
  422.         csVertVal:                INTEGER;                                {(word) current vertical}
  423.         csVertMax:                INTEGER;                                {(word) max vertical}
  424.     END;
  425.  
  426.     VDSettingsPtr = ^VDSettings;
  427.  
  428.     DisplayModeID = LONGINT;
  429.  
  430.     VideoDeviceType = LONGINT;
  431.  
  432.     GammaTableID = LONGINT;
  433.  
  434. { DepthMode
  435.     This abstract data type is used to to reference RELATIVE pixel depths.
  436.     Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
  437.  
  438.     Bits per pixel DOES NOT directly map to 'DepthMode'  For example, on some
  439.     graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
  440.     hardware, 'kDepthMode1' may represent 8BPP.
  441.  
  442.     DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
  443.     behave as expected.  The values of the constants which comprise the set are such
  444.     that 'kDepthMode4 < kDepthMode6' behaves as expected.
  445. }
  446.     DepthMode = INTEGER;
  447.  
  448.  
  449. CONST
  450.     kDepthMode1                    = 128;
  451.     kDepthMode2                    = 129;
  452.     kDepthMode3                    = 130;
  453.     kDepthMode4                    = 131;
  454.     kDepthMode5                    = 132;
  455.     kDepthMode6                    = 133;
  456.  
  457.     kFirstDepthMode                = 128;                            { These constants are obsolete, and just included    }
  458.     kSecondDepthMode            = 129;                            { for clients that have converted to the above        }
  459.     kThirdDepthMode                = 130;                            { kDepthModeXXX constants.                            }
  460.     kFourthDepthMode            = 131;
  461.     kFifthDepthMode                = 132;
  462.     kSixthDepthMode                = 133;
  463.  
  464.  
  465. TYPE
  466.     VDResolutionInfoRec = RECORD
  467.         csPreviousDisplayModeID: DisplayModeID;                            { ID of the previous resolution in a chain }
  468.         csDisplayModeID:        DisplayModeID;                            { ID of the next resolution }
  469.         csHorizontalPixels:        LONGINT;                                { # of pixels in a horizontal line }
  470.         csVerticalLines:        LONGINT;                                { # of lines in a screen }
  471.         csRefreshRate:            Fixed;                                    { Vertical Refresh Rate in Hz }
  472.         csMaxDepthMode:            DepthMode;                                { 0x80-based number representing max bit depth }
  473.         csReserved:                LONGINT;                                { Reserved }
  474.         csReserved1:            LONGINT;                                { Reserved }
  475.     END;
  476.  
  477.     VDResolutionInfoPtr = ^VDResolutionInfoRec;
  478.  
  479.     VDVideoParametersInfoRec = RECORD
  480.         csDisplayModeID:        DisplayModeID;                            { the ID of the resolution we want info on }
  481.         csDepthMode:            DepthMode;                                { The bit depth we want the info on (0x80 based) }
  482.         csVPBlockPtr:            VPBlockPtr;                                { Pointer to a video parameter block }
  483.         csPageCount:            LONGINT;                                { Number of pages supported by the resolution }
  484.         csDeviceType:            VideoDeviceType;                        { Device Type:  Direct, Fixed or CLUT; }
  485.         csReserved:                LONGINT;                                { Reserved }
  486.     END;
  487.  
  488.     VDVideoParametersInfoPtr = ^VDVideoParametersInfoRec;
  489.  
  490.     VDGammaInfoRec = RECORD
  491.         csLastGammaID:            GammaTableID;                            { the ID of the previous gamma table }
  492.         csNextGammaID:            GammaTableID;                            { the ID of the next gamma table }
  493.         csGammaPtr:                Ptr;                                    { Ptr to a gamma table data }
  494.         csReserved:                LONGINT;                                { Reserved }
  495.     END;
  496.  
  497.     VDGammaInfoPtr = ^VDGammaInfoRec;
  498.  
  499.     VDGetGammaListRec = RECORD
  500.         csPreviousGammaTableID:    GammaTableID;                            { ID of the previous gamma table }
  501.         csGammaTableID:            GammaTableID;                            { ID of the gamma table following csPreviousDisplayModeID }
  502.         csGammaTableSize:        LONGINT;                                { Size of the gamma table in bytes }
  503.         csGammaTableName:        ^CHAR;                                    { Gamma table name (c-string) }
  504.     END;
  505.  
  506.     VDGetGammaListPtr = ^VDGetGammaListRec;
  507.  
  508.     VDRetrieveGammaRec = RECORD
  509.         csGammaTableID:            GammaTableID;                            { ID of gamma table to retrieve }
  510.         csGammaTablePtr:        ^GammaTbl;                                { Location to copy desired gamma to }
  511.     END;
  512.  
  513.     VDRetrieveGammaPtr = ^VDRetrieveGammaRec;
  514.  
  515.     VDSetHardwareCursorRec = RECORD
  516.         csCursorRef:            Ptr;
  517.     END;
  518.  
  519.     VDSetHardwareCursorPtr = ^VDSetHardwareCursorRec;
  520.  
  521.     VDDrawHardwareCursorRec = RECORD
  522.         csCursorX:                LONGINT;
  523.         csCursorY:                LONGINT;
  524.         csCursorVisible:        LONGINT;
  525.     END;
  526.  
  527.     VDDrawHardwareCursorPtr = ^VDDrawHardwareCursorRec;
  528.  
  529.     VDSupportsHardwareCursorRec = RECORD
  530.         csSupportsHardwareCursor: BOOLEAN;                                { True if hardware cursor is supported }
  531.     END;
  532.  
  533.     VDSupportsHardwareCursorPtr = ^VDSupportsHardwareCursorRec;
  534.  
  535.     VDDefMode = RECORD
  536.         csID:                    SInt8; (* UInt8 *)
  537.     END;
  538.  
  539.     VDDefModePtr = ^VDDefMode;
  540.  
  541.     VDSyncInfoRec = RECORD
  542.         csMode:                    SInt8; (* UInt8 *)
  543.         csFlags:                SInt8; (* UInt8 *)
  544.     END;
  545.  
  546.     VDSyncInfoPtr = ^VDSyncInfoRec;
  547.  
  548.     VDConvolutionInfoRec = RECORD
  549.         csDisplayModeID:        DisplayModeID;                            { the ID of the resolution we want info on }
  550.         csDepthMode:            DepthMode;                                { The bit depth we want the info on (0x80 based) }
  551.         csPage:                    LONGINT;
  552.         csFlags:                UInt32;
  553.         csReserved:                UInt32;
  554.     END;
  555.  
  556.     VDConvolutionInfoPtr = ^VDConvolutionInfoRec;
  557.  
  558.  
  559. {$ALIGN RESET}
  560. {$POP}
  561.  
  562. {$SETC UsingIncludes := VideoIncludes}
  563.  
  564. {$ENDC} {__VIDEO__}
  565.  
  566. {$IFC NOT UsingIncludes}
  567.  END.
  568. {$ENDC}
  569.